﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ejercicio_2___Estacionamiento
{

    class Program
    {
        static void Main(string[] args)
        {
            Playa p = new Playa(3, 5.00);
            double monto;
            Auto a01 = new Auto("Gol", "TBU345", false);
            Auto a02 = new Auto("Caddy", "FIC921", false);
            Auto a03 = new Auto("Vitara", "TOC654", false);
            Auto a04 = new Auto("Fun", "PLO664", false);
            Auto a05 = new Auto("Logan", "CAI129", false);
            Auto a06 = new Auto("Corsa", "CAB766", false);
            Auto a07 = new Auto("Tiida", "TIL954", false);
            Auto a08 = new Auto("Palio", "FON554", false);
            Auto a09 = new Auto("Fiesta", "PPP449", false);
            Auto a10 = new Auto("Suran", "AND388", false);
            Auto a11 = new Auto("Seat", "XOR566", false);
            Auto a12 = new Auto("Kangoo", "SHI621", false);

            if (p.RegistrarIngreso(a01, new DateTime(2010, 4, 30, 07, 23, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a01.Marca, a01.Matricula); }
            if (p.RegistrarIngreso(a02, new DateTime(2010, 4, 30, 07, 45, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a02.Marca, a02.Matricula); }
            if (p.RegistrarEgreso(a01, new DateTime(2010, 4, 30, 08, 29, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a01.Marca, a01.Matricula, monto); }
            if (p.RegistrarIngreso(a03, new DateTime(2010, 4, 30, 9, 11, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a03.Marca, a03.Matricula); }
            if (p.RegistrarIngreso(a04, new DateTime(2010, 4, 30, 9, 25, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a04.Marca, a04.Matricula); }
            if (p.RegistrarIngreso(a05, new DateTime(2010, 4, 30, 9, 27, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a05.Marca, a05.Matricula); }
            if (p.RegistrarIngreso(a06, new DateTime(2010, 4, 30, 9, 50, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a06.Marca, a06.Matricula); }
            if (p.RegistrarIngreso(a07, new DateTime(2010, 4, 30, 10, 23, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a07.Marca, a07.Matricula); }
            if (p.RegistrarEgreso(a04, new DateTime(2010, 4, 30, 10, 29, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a04.Marca, a04.Matricula, monto); }
            if (p.RegistrarEgreso(a02, new DateTime(2010, 4, 30, 10, 55, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a02.Marca, a02.Matricula, monto); }
            if (p.RegistrarEgreso(a03, new DateTime(2010, 4, 30, 10, 58, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a03.Marca, a03.Matricula, monto); }
            if (p.RegistrarIngreso(a08, new DateTime(2010, 4, 30, 11, 23, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a08.Marca, a08.Matricula); }
            if (p.RegistrarIngreso(a09, new DateTime(2010, 4, 30, 11, 25, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a09.Marca, a09.Matricula); }
            if (p.RegistrarIngreso(a10, new DateTime(2010, 4, 30, 11, 33, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a10.Marca, a10.Matricula); }
            if (p.RegistrarIngreso(a11, new DateTime(2010, 4, 30, 11, 45, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a11.Marca, a11.Matricula); }
            if (p.RegistrarEgreso(a05, new DateTime(2010, 4, 30, 12, 29, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a05.Marca, a05.Matricula, monto); }
            if (p.RegistrarEgreso(a06, new DateTime(2010, 4, 30, 12, 31, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a06.Marca, a06.Matricula, monto); }
            if (p.RegistrarEgreso(a07, new DateTime(2010, 4, 30, 12, 32, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a07.Marca, a07.Matricula, monto); }
            if (p.RegistrarEgreso(a08, new DateTime(2010, 4, 30, 12, 47, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a08.Marca, a08.Matricula, monto); }
            if (p.RegistrarEgreso(a09, new DateTime(2010, 4, 30, 13, 29, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a09.Marca, a09.Matricula, monto); }
            if (p.RegistrarEgreso(a10, new DateTime(2010, 4, 30, 13, 39, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a10.Marca, a10.Matricula, monto); }
            if (p.RegistrarIngreso(a12, new DateTime(2010, 4, 30, 16, 23, 0)))
            { Console.WriteLine("El {0} - {1} se estacionó correctamente", a12.Marca, a12.Matricula); }
            if (p.RegistrarEgreso(a11, new DateTime(2010, 4, 30, 18, 29, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a11.Marca, a11.Matricula, monto); }
            if (p.RegistrarEgreso(a12, new DateTime(2010, 4, 30, 18, 45, 0), out monto))
            { Console.WriteLine("El {0} - {1} abona ${2:n}", a12.Marca, a12.Matricula, monto); }

            Console.WriteLine("Se estacionaron: {0} autos", p.TotalAutos); // 10
            Console.WriteLine("Se recaudó: {0} ", p.TotalRecaudacion); // 140
            Console.ReadLine();
        }
    }

}
